# Contributor: qaqland <qaq@qaq.land>
# Maintainer: qaqland <qaq@qaq.land>
pkgname=bats-file
pkgver=0.4.0
pkgrel=0
pkgdesc="Common filesystem assertions for Bats"
url="https://github.com/bats-core/bats-file"
arch="noarch"
license="CC0-1.0"
depends="bash bats-core bats-support"
source="$pkgname-$pkgver.tar.gz::https://github.com/bats-core/bats-file/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # test failed

# {54,55,59}-{10,11} need root
# 57-{10,11} python's socket raise OSError: AF_UNIX path too long
check() {
	BATS_LIB_PATH=/usr/lib/bats bats test
}

package() {
	install -Dm644 load.bash "$pkgdir"/usr/lib/bats/bats-file/load.bash
	install -Dm644 src/* -t "$pkgdir"/usr/lib/bats/bats-file/src
}

sha512sums="
373262eb0dd01b9a46ab6f74e74f8cca867048fc757ad48126b7aa26ba173989e77c3ae9007e1bbe646f4f461fcd1c2be6e60b3a55242ae4b73f41d42c323bb6  bats-file-0.4.0.tar.gz
"
